using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using EFDataBase.Models.Mapping;

namespace EFDataBase.Models
{
    public partial class YiDaShuiHangsContext : DbContext
    {
        static YiDaShuiHangsContext()
        {
            Database.SetInitializer<YiDaShuiHangsContext>(null);
        }

        public YiDaShuiHangsContext()
            : base("Name=YiDaShuiHangsContext")
        {
        }

        public DbSet<area> areas { get; set; }
        public DbSet<clientlist> clientlists { get; set; }
        public DbSet<manager> managers { get; set; }
        public DbSet<Orders_Record> Orders_Record { get; set; }
        public DbSet<Product> Products { get; set; }
        public DbSet<Product_attributes> Product_attributes { get; set; }
        public DbSet<record_askwater> record_askwater { get; set; }
        public DbSet<record_askwater_back> record_askwater_back { get; set; }
        public DbSet<ShoppingCar> ShoppingCars { get; set; }
        public DbSet<taocan_list> taocan_list { get; set; }
        public DbSet<taocan_list_back> taocan_list_back { get; set; }
        public DbSet<ShopingCar_Pro> ShopingCar_Pro { get; set; }
        public DbSet<View_Order_record> View_Order_record { get; set; }
        public DbSet<View_product> View_product { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new areaMap());
            modelBuilder.Configurations.Add(new clientlistMap());
            modelBuilder.Configurations.Add(new managerMap());
            modelBuilder.Configurations.Add(new Orders_RecordMap());
            modelBuilder.Configurations.Add(new ProductMap());
            modelBuilder.Configurations.Add(new Product_attributesMap());
            modelBuilder.Configurations.Add(new record_askwaterMap());
            modelBuilder.Configurations.Add(new record_askwater_backMap());
            modelBuilder.Configurations.Add(new ShoppingCarMap());
            modelBuilder.Configurations.Add(new taocan_listMap());
            modelBuilder.Configurations.Add(new taocan_list_backMap());
            modelBuilder.Configurations.Add(new ShopingCar_ProMap());
            modelBuilder.Configurations.Add(new View_Order_recordMap());
            modelBuilder.Configurations.Add(new View_productMap());
        }
    }
}
